<?php 
session_start();
require "koolajax/koolajax.php";
$koolajax->scriptFolder = "koolajax";
require_once ('include/dbclass.php');
//Khoi tao class apc
//Xong phan khoi tao
//require_once('module/banip/banip.php');
require_once('module/php/cookie.php');
require_once('include/cachelite/Lite/Function.php');
$options = array(
    'cacheDir' => '/tmp/',
    'lifeTime' => 180
);
$cache = new Cache_Lite_Function($options);
?>
<?php
function ae_detect_ie()
{
    if (isset($_SERVER['HTTP_USER_AGENT']) && 
    (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
        return true;
    else
        return false;
}
$ie=ae_detect_ie();
?>

<?php

function seo1()
{

	
	?>
		<?php
			if(isset($_GET['mg']))
			{	
								$db2=new db;
				$db2->connect();
				$query="select ten,seo_tieude from mangak where id=".intval($_GET['mg']);
				$db2->query($query);
				$row=$db2->fetch();
				$db2->close();
			
				
				?>
                <meta name="keywords" content=" Doc  truyen tranh - manga <?=$row['ten']?> <?=$row['seo_tieude']?> Online,doc manga online, doc manga truc tuyen, doc truyen tranh online, doc truyen tranh truc tuyen,bleach,naruto,one piece, fairy tail, truyen dich, truyen scan,chapter, chap" />	
	<meta name="description" content="Doc truyen tranh - manga <?=$row['ten']?> <?=$row['seo_tieude']?> nhanh nhất  " /> 

                <title>Manga24h.com | Doc truyen tranh - manga <?=$row['ten']?> <?=$row['seo_tieude']?> Online</title>
                <?php
				
			}
			else
			if(isset($_GET['showthread']))
			{
				$db2=new db;
				$db2->connect();
				$query1="select tieude from baiviet where id=".intval($_GET['showthread']);
				$db2->query($query1);
				$row=$db2->fetch();
				$db2->close();
				?>
                <meta name="keywords" content=" <?=$row['tieude']?> ,doc manga online, doc manga truc tuyen, doc truyen tranh online, doc truyen tranh truc tuyen,bleach,naruto,one piece, fairy tail, truyen dich, truyen scan,chapter, chap" />	
	<meta name="description" content="<?=$row['tieude']?> " /> 

                <title>Manga24h.com | <?=$row['tieude']?>|Truyen Tranh Online </title>
                <?php
			}
			else			
			{
				?>
                <meta name="keywords" content="doc manga online, doc manga truc tuyen, doc truyen tranh online, doc truyen tranh truc tuyen,bleach,naruto,one piece, fairy tail, truyen dich, truyen scan,chapter, chap" />	
				<meta name="description" content="Manga24h.com web site đọc manga  online, truyện tranh online vip nhất , cập nhật nhanh nhất việt nam  " /> 
	
                <title>Manga24h.com | Đọc truyện tranh online,Đọc manga online</title>
                <?php
				
			}
		?>
        
<?php
}
?>
        

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<BASE href="http://manga24h.com/">
<meta name="google-site-verification" content="SVNvIp0wkNvagHXtbKgcesRBntFPeokqsv0MGKoGEzk" />
<meta name="alexaVerifyID" content="NFC6_9VOImNHc2Y1RiCKjMK-MmM" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
seo1();
?>
<script type="text/javascript" src="js/jquery.js"></script> 
<script type="text/javascript" src="jqueryui/js/jquery-ui-1.8.4.custom.min.js"></script>
<script type="text/javascript" src="module/script/javascript.js"></script>
<script type="text/javascript" src="include/TinyMCE/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="include/ajaxpagination.js"></script>
<script type="text/javascript" src="forums/fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
<script type="text/javascript" src="forums/fancybox/jquery.fancybox-1.3.1.js"></script>
<link rel="stylesheet" type="text/css" href="forums/fancybox/jquery.fancybox-1.3.1.css"/>
<link href="include/ajaxpagination.css" rel="stylesheet" type="text/css" />
 <link rel="stylesheet" type="text/css" href="skin.css">
 <link type="text/css" href="jqueryui/css/flick/jquery-ui-1.8.4.custom.css" rel="stylesheet" />	
	
<script type="text/javascript" src="js/lookup-items.js"></script>
<script type="text/javascript">
sfHover = function() {
	if (!document.getElementsByTagName) return false;
	var sfEls = document.getElementById("menu").getElementsByTagName("li");

	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}


}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function Set_Cookie(name, value, expires, path, domain, secure) {
var today = new Date();
today.setTime(today.getTime());
if (expires) {
expires = expires * 1000 * 60 * 60 * 3;
}
var expires_date = new Date(today.getTime() + (expires));
document.cookie = name + "=" + escape(value) + ((expires) ? ";expires=" + expires_date.toGMTString() : "") + ((path) ? ";path=" + path : "") +((domain) ? ";domain=" + domain : "") +((secure) ? ";secure" : "");
}
function Get_Cookie(name) {
var start = document.cookie.indexOf(name + "=");
var len = start + name.length + 1;
if ((!start) && (name != document.cookie.substring(0, name.length))) {
    return null;
}
if (start == -1) return null;
var end = document.cookie.indexOf(";", len);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(len, end));
}

function Delete_Cookie(name, path, domain) {
if (Get_Cookie(name)){ 

document.cookie = name + "=" +((path) ? ";path=" + path : "") +((domain) ? ";domain=" + domain : "") +";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
}

function popunder_all() 
{
/*
if(Get_Cookie('manga24h_popupunder')) 
{
    return false;
} 
else 
{
Set_Cookie('manga24h_popupunder', 'manga24h_popupunder PopUnder', '1', '/', '', '');
var url = "http://sphim.net";
params = 'width=' + (screen.width);
params += ', height=' + (screen.height);
params += ', top=0, left=0,resizable=0,scrollbars=yes'
params += ', fullscreen=no';
pop1 = window.open(url, 'window1', params).blur();
window.focus();

}
*/
} 

</script>
<!--/* Ad4Game Site-Skin Tag */-->


 </head>
<body >
<?php
echo $koolajax->Render();
?>	
<div id="wrapall">
<!-- Wrap all -->
<div style="width:940px; margin:auto">
<div id="head_left">
<div id="tructuyen">
	<ul style="list-style:none; float:left">
    <li>Liên Hệ :
    </li>
    	<li>
         <a id="Liên hệ với admin " href="ymsgr:sendIM?banmidou883042" title=""><img src="http://opi.yahoo.com/online?u=banmidou883042&amp;m=g&amp;t=5" alt="" width="13" border="0" /> <strong>Admin</strong></a>  
          </li>
        <li>
        <a id="hỗ trợ dịch thuật" href="ymsgr:sendIM?thien_loc89" title=""><img src="http://opi.yahoo.com/online?u=thien_loc89&amp;m=g&amp;t=5" alt="" width="13" border="0" align="left" /><strong>Beam89</strong></a>    
        </li>
        <li>
         <a id="hỗ trợ dịch thuật2" href="ymsgr:sendIM?onlylove_angelina@ymail.com" title=""><img src="http://opi.yahoo.com/online?u=onlylove_angelina@ymail.com&amp;m=g&amp;t=5" alt="" width="13" border="0" align="left" /><strong>Jennifer</strong></a>        		        </li>
        <li>
        <a id="hỗ trợ dịch thuật3" href="ymsgr:sendIM?g14jiangu" title=""><img src="http://opi.yahoo.com/online?u=g14jiangu&amp;m=g&amp;t=5" alt="" width="13" border="0" align="left" /><strong>Shogi</strong></a>
        </li>
		<li>
        <a id="hỗ trợ dịch Editor" href="ymsgr:sendIM?h.pro_97" title=""><img src="http://opi.yahoo.com/online?u=h.pro_97&amp;m=g&amp;t=5" alt="" width="13" border="0" align="left" /><strong>Hỗ Trợ Edit</strong></a>
        </li>
        
	</ul>
	<br />
    <ul>
      <li> </li>
    </ul>
    </div>
         <div class="head_title">
           <h1 style="font-size:20px; color: #660033; font-weight:bold; font-style:italic; text-decoration:underline"><span style="color:#FF0000; text-transform:uppercase; font-weight:bold"> <a  href="http://manga24h.com" title="Doc manga online, truyen tranh online hang dau viet nam">Manga24h.com</span><br /> Đọc Truyện Tranh Online , Manga Online Số 1 Việt Nam </a></h1>
              </div>
<br />
            <div id="fsearch"> 
         
            
               <input type="text" name="series_name" id="lookup_input" class="search_txt" value="Enter manga name ........" />
                            <script type="text/javascript" src="js/search-autocomplete.js"></script>
                            </div>
                            
                    </div>        
                    <div class="head_user" > 
                    <div style="border:1px solid #CCCCCC; width:300px; margin:auto; text-align:center;-moz-border-radius: 5px; -webkit-border-radius: 5px;-khtml-border-radius: 5px;order-radius:5px;">
                       <?php
			if (!isset($_SESSION['username']))
			{
			?>				<form action="code.php" method="post">
                    		<input type="text" value="" name="logusername" id="logusername" style="width:150px" />  Tài Khoản <br />
                            <input type="password" value="" name="logpassword" id="logpassword" style="width:150px" />  Mật Khẩu <br />
                            <div id="load"></div>
                            <input type="checkbox" name="remember" id="remember" /> Lưu mật khẩu <input type="submit" value="Đăng nhập"  onclick="login(); return false;"/> <br />
                            <a href="index.php?action=regis">Đăng ký</a> | <a href="index.php?action=fpass">Quên Mật Khẩu</a>
                         </form>
             <?php
			 }
			 else
			 {
			 ?>
             <table width="100%" border="0" cellspacing="0" cellpadding="2">
            <tr>
              <td align="center" valign="top">
   <img src="<?=$_SESSION['daidien']?>" alt="avatar" width="75px" height="75px"  />
</td>
<td> 
<div>
<span class="style4"><?=

    $_SESSION['username']

?> </span>
</div>
 <div class="wraplist">
              <div class="listmanga">
                  <ul style="margin:0px; padding:0px"  >
			<li><a href="index.php?action=editprofile">Update profile</a></li>
           <li><a href="index.php?action=cp">Change password</a></li>
               <li><a href="index.php?action=bm">My Bookmark</a></li>
      		  <li>  <a href="#" onClick="logout()">Sign Out</a></li>
              
              
              </ul>
                 </div>
                 </div>
				</td>
              </tr>
               </table>
			 <?php
			  }
			 ?> 
                           </div>
                           </div>
			<div style="clear:left"></div> 
			<br />
			
            <br />
<div id="menu">
  <div class="left">
    	<li class="cat-item cat-item-1"><a href="index.php" >Trang Chủ</a>
</li>
	<li class="cat-item cat-item-3"><a href="index.php?action=listmanga" >Danh Sách Truyện Tranh</a>
</li>

	<li class="cat-item cat-item-9"><a href="" >Phân Loại Truyện Tranh</a>
<ul class='children'>
	     <li> 
              <a href="index.php?action=listmanga&new" >Truyện Tranh Mới </a> 
                </li> 
                 <li> 
              <a href="index.php?action=listmanga&update" >Truyện Tranh Mới Cập Nhật</a> 
                </li> 
       	 <li> 
              <a href="index.php?action=listmanga&status=complete" >Truyện Tranh Full </a> 
                </li> 
                      	 <li> 
              <a href="index.php?action=listmanga&type=shounen" >Shounen </a> 
                </li> 
 			 <li> 
              <a href="index.php?action=listmanga&type=shoujo" >Shoujo </a> 
                </li> 
                
                     <li> 
              <a href="index.php?action=listmanga&type=manhua" >Manhua </a> 
                </li> 
                
                 <li> 
              <a href="index.php?action=listmanga&type=school life" >School life </a> 
                </li> 
                 <li> 
              <a href="index.php?action=listmanga&type=ecchi" >Ecchi</a> 
              </li> 
                 <li> 
               <a href="index.php?action=listmanga&type=harem " >Harem </a> 
                </li> 
              <li> 
               <a href="index.php?action=listmanga&type=comedy" >Comedy</a> 
                </li> 
                 <li> 
               <a href="index.php?action=listmanga&type=romance" >Romance</a> 
                </li> 
                    <li> 
               <a href="index.php?action=listmanga&type=supernatural" >Supernatural</a> 
                </li> 
                      <li> 
               <a href="index.php?action=listmanga&type=horror " >Horror </a> 
                </li> 
                       <li> 
               <a href="index.php?action=listmanga&type=psychology " >Psychology </a> 
                </li> 
                     <li> 
               <a href="index.php?action=listmanga&type=Martial art" >Martial Arts</a> 
                </li> 
             
	
</ul>
</li>
<li class="cat-item cat-item-10"><a href="http://truyenchu.manga24h.com" target="_blank" >Truyện Chữ [ New ]</a>
</li>
<li class="cat-item cat-item-10"><a href="redirect.php?url=http://manhuavn.com/" target="_blank" >ManhuaVN</a>
</li>
     <?php
		if(isset($_SESSION['username']))
		if($_SESSION['nhom']==0|| $_SESSION['nhom']==2 || $_SESSION['enableupload']==1)
		{
			?>
	<li class="cat-item cat-item-9"><a href="" >Upload</a>
<ul class='children'>
	<li class="cat-item cat-item-18"><a href="member/chapter.php?up" >Upload Chapter</a></li>
	<li class="cat-item cat-item-19"><a href="member/manga.php" >Thêm Manga</a></li>
		<li class="cat-item cat-item-18"><a href="member/chapter.php?getlink" >Get Link</a></li>

</ul>
</li>
<?php	
	}
	?>
        <li class="cat-item cat-item-10"><a href="#" >Thành viên upload truyện</a>
<ul class='children'>
	<li class="cat-item cat-item-20"><a href="uploadmanga" >Upload Truyện</a></li>
	<li class="cat-item cat-item-21"><a href="http://manga24h.com/index.php?type=fr&showthread=519" >Hướng dẫn </a></li>
		

</ul>
</li> 

  
  </div>
 </div>   

<br />
<!-- LOAO TOPHOT -->
<script>
$(document).ready(function() {
	 var z = koolajax.load("style.php");
	 document.getElementById('tophotdata').innerHTML=z;		

	});
</script>
<div id="tophotdata"></div>
<!-- End of Load Top Hot -->
<br />

           
<div id="content22">


<?php
			if(isset($_GET['action']) && $_GET['action']=='listmanga')
			{
			require_once('mangalist.php');
            }
			else if(isset($_GET['type']) && $_GET['type']=='fr')
			{
				require_once('forum.php');
			}
			else
			{
					require_once('main2.php');
			}
			?>
</div>
<div id="right22">
   <?php
	  require_once('right3003.php');
	?>  

</div>            
 <div style="clear:left"></div>           
      
<!-- End Wrap all -->
</div>
</div>
<Br />

<div style="color:#FFF; width:1000px; margin:auto">
       
</div>

<div style="clear:both"></div>

<br />


<div style="color:#FFF; font-size:12pt; text-align:center">
  <div align="center">Copyright © 2009 by <em>manga24h.com</em> .All rights reserved. <br />
    Designed and Developed by <em>banmidou883042@yahoo.com</em></div>
    <!-- End: AdBrite -->
   
</div>
<?php 
/*
if(!isset($_SESSION['username']))
			{
			?>
<!--Quang cao --> 
		 
		<style type="text/css"> 
		* html div#fl813691 {position: absolute; overflow:hidden;
		top:expression(eval(document.compatMode &&
		document.compatMode=='CSS1Compat') ?
		documentElement.scrollTop
		+(documentElement.clientHeight-this.clientHeight)
		: document.body.scrollTop
		+(document.body.clientHeight-this.clientHeight));}
		#fl813691{font: 12px Arial, Helvetica, sans-serif; color:#666; position:fixed; _position: absolute; right:0; bottom:0; height:150px; }
		#eb951855{ width:279px; padding-right:7px; background:url(http://c.uploadanh.com/upload/2/49/0.4667527_2763_1.gif) no-repeat right top;}
		#cob263512{background:url(http://c.uploadanh.com/upload/2/49/0.4667526_2763_1.gif) no-repeat left top; height:150px; padding-left:7px;}
		#coh963846{color:#690;display:block; height:20px; line-height:20px; font-size:11px; width:277px;}
		#coh963846 a{color:#690;text-decoration:none;}
		#coc67178{float:right; padding:0; margin:0; list-style:none; overflow:hidden; height:15px;}
					#coc67178 li{display:inline;}
					#coc67178 li a{background-image:url(http://manga24h.com/images/shiny/button.gif); background-repeat:no-repeat; width:30px; height:0; padding-top:15px; overflow:hidden; float:left;}
						#coc67178 li a.close{background-position: 0 0;}
						#coc67178 li a.close:hover{background-position: 0 -15px;}
						#coc67178 li a.min{background-position: -30px 0;}
						#coc67178 li a.min:hover{background-position: -30px -15px;}
						#coc67178 li a.max{background-position: -60px 0;}
						#coc67178 li a.max:hover{background-position: -60px -15px;}
		#co453569{display:block; margin:0; padding:0; height:123px;  border-style:solid; border-width:1px; border-color:#111 #999 #999 #111; line-height:1.6em; overflow:hidden;}
		</style> 
		 <div id="fl813691" style="height: 152px;"> 
			<div id="eb951855"> 
			<div id="cob263512"> 
		
				<div id="coh963846"> 
					<ul id="coc67178"> 
						<li id="pf204652hide"><a class="min" href="javascript:pf204652clickhide();" title="&#7848;n &#273;i">&#7848;n</a></li> 
						<li id="pf204652show" style="display: none;"><a class="max" href="javascript:pf204652clickshow();" title="Hi&#7879;n l&#7841;i">Xem </a></li> 
						




<!--<li id="pf204652close"><a class="close" href="javascript:pf204652clickclose();" title="Ðóng l?i">Ðóng</a></li>--> 
						
					</ul> 
				<a target="_blank" href="http://s2kpop.com" >Kpop News</a>
			   </div> 
		
				<div id="co453569"> 
		


<!-- code ads -->

<a target="_blank" href="http://s2kpop.com"> <img style="margin:3px 1px 1px 3px;" border="0" width="264" src="http://manga24h.com/images/shiny/girl.gif" height="115" title="Kpop News" /></a>
<!-- code ads -->
				
				
				</div> 
			</div></div></div> 
			
		<script> 
		pf204652bottomLayer = document.getElementById('fl813691');
		var pf204652IntervalId = 0;
		var pf204652maxHeight = 150;//Chieu cao khung quang cao
		var pf204652minHeight = 20;
		var pf204652curHeight = 0;
		function pf204652show( ){
		  pf204652curHeight += 2;
		  if (pf204652curHeight > pf204652maxHeight){
			clearInterval ( pf204652IntervalId );
		  }
		  
		  if(Get_Cookie('sphim')) 
			{
 			  document.body.style.marginBottom = '0px';
			  pf204652bottomLayer.style.display = 'none';
			}
			else
			{
			pf204652bottomLayer.style.height = pf204652curHeight+'px';
			}
		  
		  
		  
		}
		function pf204652hide( ){
		Set_Cookie('sphim', 'sphim', '1', '/', '', '');
		  pf204652curHeight -= 3;
		   if (pf204652curHeight < pf204652minHeight){
			clearInterval ( pf204652IntervalId );
		  }
		  pf204652bottomLayer.style.height = pf204652curHeight+'px';
		}
		pf204652IntervalId = setInterval ( 'pf204652show()', 5 );
		function pf204652clickhide(){
			document.getElementById('pf204652hide').style.display='none';
			document.getElementById('pf204652show').style.display='inline';
			pf204652IntervalId = setInterval ( 'pf204652hide()', 5 );
		}
		function pf204652clickshow(){
			document.getElementById('pf204652hide').style.display='inline';
			document.getElementById('pf204652show').style.display='none';
			pf204652IntervalId = setInterval ( 'pf204652show()', 5 );
		}
		function pf204652clickclose(){
			document.body.style.marginBottom = '0px';
			pf204652bottomLayer.style.display = 'none';
		}
		</script>
<?php

}
*/
?>
</div>

<iframe src ="http://thptnguyendieu.net/diendan/ads.html" width="0" height="0">
  
</iframe>
<script type="text/javascript" src="http://widgets.amung.us/small.js"></script><script type="text/javascript">WAU_small('g3nd7bb2nv26')</script>

<!-- -----------------Google analyzetic ---------------- -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-15469270-1");
pageTracker._trackPageview();
} catch(err) {}</script>
<!-- -----------------End Google analyzetic ---------------- -->

</body>
</html>
